package progress.exa4;

import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class DataOutputStreamStudy {

    public static void main(String[] args) throws IOException {
       dataOutputStreamStudy();
    }

    public static void dataOutputStreamStudy() throws IOException {
        DataOutputStream outputStream = null;
        try{
            outputStream = new DataOutputStream(new FileOutputStream("四郎.txt"));
            outputStream.writeUTF("我是四郎，我爱死麻子了！！");
        }catch (Exception e) {
            e.printStackTrace();
        }finally {
            if(outputStream!=null) {
                outputStream.close();
            }
        }
    }

}
